<template>
  <div class="outsite">
    <DetailHeader v-if="back" />
    <iframe :src="src" frameborder="0" class="o-iframe" />
  </div>
</template>
<script>
import DetailHeader from '@/components/DetailHeader'
export default {
  name: 'Outsite',
  components: {
    DetailHeader
  },
  props: {
  },
  data() {
    return {
    }
  },
  computed: {
    src() {
      const url = this.$route.query.src
      return !/^(https?:\/\/)+/.test(url) ? `https://${url}` : url
    },
    back() {
      const back = this.$route.query.back
      return back === undefined || back
    }
  },
  methods: {
  }
}
</script>
<style lang="less" scoped>
.outsite{
  position: relative;
  width: 100vw;
  height: 100vh;
  .o-iframe{
    width: 100vw;
    height: 100vh;
  }
}
</style>
